﻿cmake_minimum_required(VERSION 3.5)

project(RXECSQtModule VERSION 0.1 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
  
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

set(ProgramName RXECSQtModule)


include_directories(
	${Third_Eigen}/include
	${CMAKE_CURRENT_SOURCE_DIR}/../RX3D
	${Third_GLM}/include
    )

add_library(${ProgramName} SHARED
	RX3DQtModule_global.h
	RX3DWidget.cpp
	RX3DWidget.h
	fShader.glsl
	vShader.glsl
	Resource.qrc
	RXECSQtModule_global.h
)

link_directories(
${Third_GLEW}/lib
)

if(UNIX)
	set(LIB_PTHREAD -pthread)
endif()

target_link_libraries(${ProgramName} 
PRIVATE ${LIB_PTHREAD} 
PUBLIC Qt5::Core
PUBLIC Qt5::Gui
PUBLIC Qt5::Widgets
PUBLIC OpenGL32.lib
)
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
target_compile_definitions(RXECSQtModule PRIVATE RXECSQtModule_LIBRARY)
